from multiprocessing import Process
import os
import time
class Test:
   def __init__(self):
       print 'module name:', __name__
       print "class id "+str(id(self))

   def f(self):
       print "class id in f "+str(id(self))

if __name__ == '__main__':
   print 'process id: main', os.getpid()
   list = []
   t = None
   t = Test()
   t.f()
   t.f()
   t.f()
   for i in xrange(1,5):
       p = Process(target=t.f)
       p.start()
       p.join()
